package com.example.gymlearning.entity;

import java.util.Date;
import java.io.Serializable;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Data
@AllArgsConstructor
@NoArgsConstructor
/**
 * (KnowledgePoint)实体类
 *
 * @author makejava
 * @since 2025-10-27 21:05:53
 */

@Entity
@Table(name = "knowledge_point")
public class KnowledgePoint implements Serializable {
    private static final long serialVersionUID = 854439131586810422L;

    @Id
    private Long id;

    @Column(name = "class_id")
    private Long classId; // 分类ID
    /**
     * 知识点标题
     */
    private String title;
    /**
     * 知识点描述
     */
    private String description;
    /**
     * 学习资源链接
     */
    private String contentUrl;
    /**
     * 基础学习时长(分钟)
     */
    private Integer baseDuration;
    /**
     * 基础经验奖励
     */
    private Integer baseExperience;
    
    private String difficultyLevel;
    /**
     * 前置知识点ID，逗号分隔
     */
    private String prerequisiteIds;
    /**
     * 排序
     */
    private Integer orderNum;
    
    private Date createdTime;

    @Column(name = "package_id")
    private Long packageId;     // 所属知识包ID

    @Column(name = "knowledge_type")  // 确保有这个注解
    //新增知识点类型
    private String knowledgeType; // conceptual-概念理解型, api-API学习型, coding-代码实践型

    @Column(name = "module_id")
    private Long moduleId; // 模块ID

    // 关联字段（非数据库字段）
    private String packageName; // 知识包名称
}

